<?php
/**
 * Created by PhpStorm.
 * User: chy
 * Date: 2017/10/12
 * Time: 下午4:34
 */?>
<html  lang="utf-8">
<?php $this->load->helper('url');?>
<head>
    <script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/bootstrap.min.js"></script>
    <link href="<?php echo base_url()?>css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo base_url()?>css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <title>管理员信息修改</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <link href="<?php echo base_url()?>css/general.css" rel="stylesheet" type="text/css" />

    <link href="<?php echo base_url()?>css/main.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/jquery.js"></script>
    <script language="JavaScript"> var base_url = '<?php echo base_url()?>'; </script>
    <script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/admin.js"></script>
</head>
<script>
    function validateForm(){
        if (window.confirm("是否确认提交")) {
            return true;
        }
        return false;
    }
</script>
<body  class=" x-border-layout-ct" style="position: relative;" >
<div class="container">

    <div class="row">
        <div class="col-md-8">
            <h1>Bacteria</h1>
        </div>
    </div>
</div>
<div class="container navigation">
    <div class="row" style="background-color: #ff8000;font-size: 25px">
        <div class="col-md-8">
            <form action="<?php echo site_url('c_user_manage/queryById/'.$result['user_id'])?>" method="post" >
                <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
                <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
                <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default" type=submit name="session_manage" value="返回"/>
            </form>
        </div>
        <div class="col-xs-2">
            <a style="color: white; font-size: 14px;">
                <?php echo $_SESSION['user_id']." ".$_SESSION['user_name'];?>
            </a>
        </div>
        <div class="col-xs-2">
            <a href='<?php echo site_url('c_login/logout');?>' style="color: white; font-size: 14px;">退出登录</a>
        </div>
    </div>

<br/>

<h4 style="text-align: center">修改信息</h4>
<br/>
<form onsubmit="return validateForm()" method="POST" action="<?php echo site_url('c_user_manage/update/'.$result['user_id']);?>" style="text-align: center">
    <input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
    <input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
    <input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
    <input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
    姓名: <input type="text" name="user_name" value="<?php echo $result['user_name'];?>">

    <br><br>
    信息: <input type="text" name="user_info" value="<?php echo $result['user_info'];?>">
    <br><br>

    状态:
    <input type="radio" name="user_status" <?php if ($result['user_status']) echo "checked";?>  value="1">在职
    <input type="radio" name="user_status" <?php if (!$result['user_status']) echo "checked";?>  value="0">弃用

    <br><br>
    角色:
    <input type="radio" name="role_id" <?php if ($result['role_id']) echo "checked";?>  value="1">超级管理员
    <input type="radio" name="role_id" <?php if (!$result['role_id']) echo "checked";?>  value="0">普通管理

    <br><br>
    管理数据库:
    <input type="radio" name="user_part" <?php if ($result['role_id']) echo "checked";?>  value="0">超级管理员
    <input type="radio" name="user_part" <?php if (!$result['role_id']) echo "checked";?>  value="1">细菌
    <input type="radio" name="user_part" <?php if (!$result['role_id']) echo "checked";?>  value="2">真菌
    <input type="radio" name="user_part" <?php if (!$result['role_id']) echo "checked";?>  value="3">质粒
    <input type="radio" name="user_part" <?php if (!$result['role_id']) echo "checked";?>  value="4">细胞

    <br><br>
    <input style="width: 80px;height: 30px;background: #ff8000;color: white" class="btn btn-default" type="submit" name="submit" value="提交" >
</form>
<div class="row" style="background-color: #ff8000;font-size: 25px">
    <div align="center" style=" text-align: center"><h6 align="center" style="text-align: center;color: #ff8000;">bacteria </h6></div>
</div>
</div>
</body>
</html>
